package com.ctshk.rpc.custom.mapper;

import com.ctshk.rpc.custom.base.CustomBaseMapper;
import com.ctshk.rpc.custom.dto.ServiceRequireDTO;
import com.ctshk.rpc.custom.entity.CustomizedInquiryServiceRequire;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 服务要求 Mapper 接口
 * </p>
 *
 * @author 谢诗宏
 * @since 2021-01-13
 */
public interface CustomizedInquiryServiceRequireMapper extends CustomBaseMapper<CustomizedInquiryServiceRequire> {
    /**
     * 获取询价单服务要求列表
     * @param inquiryId
     * @return
     */
    @Select("SELECT service_type_id,service_type_name,tourist_require,gmt_create \n" +
            "FROM t_customized_inquiry_service_require \n" +
            "WHERE inquiry_id = #{inquiryId} and is_deleted = 0 ORDER BY gmt_create ASC")
    List<ServiceRequireDTO> queryListByInquiryId(@Param("inquiryId")Long inquiryId);

}
